<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>砸金蛋</title>
    <link rel="stylesheet" href="../common/css/common_mobile.css?version=1.0.0">
    <link rel="stylesheet" href="css/index.css?version=1.0.0">
    <!-- 移动端适配-->
    <script>
        var html = document.querySelector('html');
        changeRem();
        window.addEventListener('resize', changeRem);

        function changeRem() {
            var width = html.getBoundingClientRect().width;
            //console.log( width );
            html.style.fontSize = width / 10 + 'px';
        }
    </script>
</head>

<body>
<div id="wrap">
    <div class="bg"></div>
    <div class="rule"></div>
    <a href="../my.html" id="myWin">
        <div class="my">我的奖品</div>
    </a>
    <!--砸蛋区域-->
    <div class="box">
        <p class="tips">今天剩余免费<span id="change">5</span>次</p>
        <ul class="egg clearfix">
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
            <li>
                <img src="image/egg.png" class="goldegg init">
                <img src="image/base.png">
                <div class="info"></div>
            </li>
        </ul>
        <div id="hammer" class="shak"></div>
    </div>
    <!--游戏规则弹窗-->
    <div id="mask-rule">
        <div class="box-rule">
            <span class="star"></span>
            <h2>活动规则说明</h2>
            <span id="close-rule"></span>
            <div class="con">
                <div class="text">
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                    <p>活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明活动规则说明</p>
                </div>
            </div>
        </div>
    </div>
    <!--中奖提示-->
    <div id="mask">
        <div class="blin"></div>
        <div class="caidai"></div>
        <div class="winning">
            <div class="red-head"></div>
            <div class="red-body"></div>
            <div id="card">
                <a href="" target="_self" class="win"></a>
            </div>
            <a href="" target="_self" class="btn"></a>
            <span id="close"></span>
        </div>
    </div>
</div>

<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="../common/js/jquery.cookie.js"></script>
<script src="../common/js/h5_game_common.js?version=1.0.0"></script>
<script src="js/index.js?version=1.0.0"></script>
<!--<script>

    var data = "";

    //执行第一次
    clickData(true);

    //请求回调，并且在ji中执行此代码，请加入防止连点措施
    function clickData(bool) {
        $.ajaxSettings.async = false;
        if (bool) {//若只请求次数
            $.getJSON(basePath + "api/browse/browseAeI?appKey=" + queryString("appKey") + "&pId=" + queryString("pId") + "&caId=" + queryString("caId") + "&index=0&isFirst=1", "", function (datac) {
                if (null !== datac && "" !== datac) {
                    data = datac;
                    //设定中奖次数
                    $("#change").html(data.count);
                }
            });
        } else {
            $.getJSON(basePath + "api/browse/browseAeI?appKey=" + queryString("appKey") + "&pId=" + queryString("pId") + "&caId=" + queryString("caId") + "&index=0&isFirst=0", "", function (datac) {
                if (null !== datac && "" !== datac) {
                    data = datac;

                    //设定中奖的图片
                    $(".win").css("background-image", "url(" + data.adImgUrl + ")");

                    //设定中奖次数
                    $("#change").html(data.count);

                    //设定中奖的跳转链接
                    $winning.find("a").attr("href", data.adUrl + "?appKey=" + queryString("appKey") + "&pId=" + queryString("pId") + "&caId=" + queryString("caId") + "&adId=" + data.adId + "&index=0");
                }
            });
        }
    }
</script>-->
</body>
</html>